package com.java2_8;

//继承的格式为： 子级 extends 父级；
public class Student extends People {
    @Override
    public void tell(){
        System.out.println("好好学习");
        super.tell();
    }
    @Override
    public void text(){
        super.text();
        System.out.println("this is a Student!");
    }

    public Student(){
        super(); //不写也有
        System.out.println("这是子类构造器");
    }

    public Student(String name){
        this(name,18);
    }

    public Student(String name,int age){
        super(name,age);
    }

}
